package com.settlement.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.settlement.system.handler.disruptor.KafkaConsumer;
import com.settlement.system.handler.disruptor.OrderConsumer;
import com.settlement.system.model.entity.SysBill;
import com.settlement.system.model.entity.SysOrder;
import com.settlement.system.model.entity.SysPlatform;
import com.settlement.system.model.entity.SysStore;
import com.settlement.system.model.query.BillPageQuery;
import com.settlement.system.model.vo.DyBillImportVo;
import com.settlement.system.model.vo.SysBillVO;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 标准账单 服务类
 * </p>
 *
 * @author huangrensen
 * @since 2023-08-05
 */
public interface SysBillService extends IService<SysBill> {
    /**
     * 标准账单分页列表
     *
     * @return
     */
    Page<SysBillVO> getBillPage(BillPageQuery queryParams);

    /**
     * 标准账单分页列表(不分权限)
     *
     * @return
     */
    Page<SysBill> getAllBillPage(BillPageQuery queryParams);

    void updateBill(SysBill sysBill);

    void generateOtherBill(SysBill projectBill, String platformKey, Long storeId, int type);

    List<SysBill> getList(BillPageQuery queryParams);

    Set<String> columnList();

    void checkAndSave(SysBill sysBill, SysStore sysStore, SysPlatform sysPlatform, String projectName, Map<String, KafkaConsumer.CommonItem> commonMap, String billType);

    void updateBusinessDate(String linkNo, LocalDateTime businessDate);

    void saveCalculateBill(SysBill projectBill, SysStore sysStore, SysPlatform sysPlatform, String standardColumn);

    List<SysBill> getListByLinkNoAndBillMonth(String linkNo, List<String> billDateList, List<String> calculateList);
    void deleteOldRecords(List<SysBill> oldList);

    void updateAuditId(SysBill sysBill, String auditId, String fileAuditId);

    List<String> getBillMonthListByLinkNo(String linkNo);
}
